Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove overwritting when reaching prompt line limit #82

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ygor-sena
Copy link
Collaborator

This small PR fixes the problem of the user input being overwritten in the same line instead of continuing in the line below it. It was necessary to wrap GREEN_PROMPT around \001an \002.

   Current implementation:
    \001 (^A) start non-visible characters
    \002 (^B) end non-visible characters
   all characters except \001 and \002 (following a \001) are copied to
   the returned string; all characters except those between \001 and
   \002 are assumed to be `visible'.

Source: Escape non printing characters in a function for a bash prompt

@ygor-sena ygor-sena self-assigned this Jun 6, 2024
@ygor-sena ygor-sena added the fix label Jun 6, 2024
@ygor-sena ygor-sena requested a review from magalhaesm June 6, 2024 17:05
Copy link
Owner

@magalhaesm magalhaesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@magalhaesm magalhaesm merged commit d2a7e3a into main Jun 6, 2024
1 check passed
@magalhaesm magalhaesm deleted the fix/prompt-overwritting branch June 6, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants